<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bai 2.2</title>
<style type="text/css">
<!--
#form1 table tr td input.dientich {
	background-color: #F6F;
}
-->
</style>
</head>

<body>
<?php
	if(isset($_POST["dai"]) && isset($_POST["rong"]))
	{
		$dai=	$_POST["dai"];
		$rong=	$_POST["rong"];
		$dientich=$dai*$rong;
	}
?>
<form id="form1" name="form1" method="post" action="Bai2_2.php">
  <table width="350" align="center" cellpadding="1" cellspacing="0">
    <tr bgcolor="#FF9900">
      <td colspan="2" style="text-align: center; font-stretch:extra-expanded; font-family: Verdana, Geneva, sans-serif; color: #930; font-weight: bold;">DIỆN TÍCH HÌNH CHỮ NHẬT</td>
    </tr>
    <tr>
      <td bgcolor="#FF9966">Chiều dài:</td>
      <td bgcolor="#FF9966"><input name="dai" type="text" id="dai" value="<?php echo $dai; ?>" /></td>
    </tr>
    <tr>
      <td bgcolor="#FF9966">Chiều rộng:</td>
      <td bgcolor="#FF9966"><input name="rong" type="text" id="rong" value="<?php echo $rong; ?>" /></td>
    </tr>
    <tr>
      <td bgcolor="#FF9966">Diện tích:</td>
      <td bgcolor="#FF9966"><input name="dientich" type="text" id="dientich" style="background-color:#F9C;" value="<?php echo $dientich; ?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <td colspan="2" bgcolor="#FF9966" style="text-align: center"><input type="submit" name="submit" id="submit" value="Tính" /></td>
    </tr>
  </table>
</form>
</body>
</html>